#ifndef WF_INFODIST2_H
#define WF_INFODIST2_H

#include "pf_previewactioninterface.h"
#include "gui_export.h"

/**
 * This action class can handle user events to measure distances between
 * entities and points.
 *
 */
class GUI_EXPORT WF_InfoDist2 : public PF_PreviewActionInterface {
	Q_OBJECT
public:
    /**
     * Action States.
     */
    enum Status {
        SetEntity,    /**< Setting the entity. */
        SetPoint      /**< Setting the point of the distance. */
    };

public:
    WF_InfoDist2(PF_Container& container,
                        PF_GraphicView& graphicView);
    ~WF_InfoDist2() {}

	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);

    virtual void init(int status=0);
    virtual void trigger();
	
    virtual void mouseMoveEvent(PF_MouseEvent* e);
    virtual void mouseReleaseEvent(PF_MouseEvent* e);
	virtual void coordinateEvent(PF_CoordinateEvent* e);

    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

private:
	PF_Entity* entity;
    PF_Vector point;
};

#endif
